<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>背景图片样式设置</title>
    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            border: 3px solid coral ;
            height: 400px;
            background-image: url("image/bg.jpg");
            /*background-repeat: repeat;*/
            /*background-repeat: repeat-x;*/
            /*background-repeat: repeat-y;*/
            background-repeat: no-repeat;
            /*background-position: center;*/
            /*background-position: 50% 50%;
            background-position: 66% 30%;
            background-position: 50px 100px;*/
            background-size: 800px 400px;

            background: #00ff00 url("image/bg.jpg") no-repeat center/150px 150px;
        }
    </style>
</head>
<body>

</body>
</html>